#ifndef _bsp_USART_H
#define _bsp_USART_H
#include <stdio.h>
#include "stm32f10x.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_gpio.h"

#define USART1_TX_GPIO_PORT GPIOA
#define USART1_TX_GPIO_PIN  GPIO_Pin_9

#define USART1_RX_GPIO_PORT   GPIOA
#define USART1_RX_GPIO_PIN   GPIO_Pin_10

#define USART1_BaudRate 115200

//#ifndef uint32_t
//#define uint32_t unsigned int
//#endif
//#ifndef uint8_t
//#define uint8_t unsigned char
//#endif


void USART1_NVIC_Init (void);
void USART1_Init_cfg (uint32_t BAUDRATE);
void USARTx_WriteByte (USART_TypeDef* USARTx,uint8_t data);
void USARTx_Write2Byte(USART_TypeDef* USARTx,uint16_t data);
void USARTx_WriteString(USART_TypeDef* USARTx,char * pString);
int fputc(int ch/*c*/, FILE * f/*stream*/);
int fgetc(FILE *f);
#endif

